dragsource: Keep the source alive long enough
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 May 2021 21:00:17 +0000 (17:00 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 May 2021 21:00:17 +0000 (17:00 -0400)
commit9e952bc7ffeabd07d0320fc04c582ea395b26e7e
treeebdd85acb7255c88d94dbfe38c6f723c1a5a6b62
parented97339ef1207374c03531ce3329543932504bc1
dragsource: Keep the source alive long enough

When a drop causes the event controller to be finalized
(directly or indirectly), we end up segfaulting while
trying to wrap up the drag operation. So, keep a reference
on the GtkDragSource from when the drag begins to when
it is done.

This fixes a crash in gnome-todo when dragging tasks.
gtk/gtkdragsource.c